#include "xTimer.h"
#include "xaux.h"
#include "time.h"


CxTimer::~CxTimer()
{

}

CxTimer::CxTimer()
:m_nTimeSnapShot(0)
{

}

void CxTimer::SaveTime()
{
	m_nTimeSnapShot = xGetTickCount();
}

void CxTimer::SaveTime( ulong_t _RawVal )
{
	m_nTimeSnapShot = _RawVal;
}


bool_t CxTimer::IsTimeOut( ulong_t _MsVal )
{
	if( xGetTickCount() >= _MsVal+m_nTimeSnapShot )
		return TRUE;
	else
		return FALSE;
}

ulong_t CxTimer::GetInterval()
{
	return (long_t)clock()-m_nTimeSnapShot;
}
